

var UmengAnalyticsPlugin = function () {
};

UmengAnalyticsPlugin.prototype.call_native = function (name, args, success ,error) {
    cordova.exec(success, error, 'UmengAnalyticsPlugin', name, args);
};

UmengAnalyticsPlugin.prototype.init = function (success ,error) {
    this.call_native("init", [], success ,error);
};

UmengAnalyticsPlugin.prototype.setDebugMode = function (mode ,success ,error) {
    this.call_native("setDebugMode", [mode], success ,error);
};

UmengAnalyticsPlugin.prototype.onKillProcess = function (success ,error) {
    this.call_native("onKillProcess", [] , success , error);
};

UmengAnalyticsPlugin.prototype.onPageStart = function (name , success ,error) {
    this.call_native("onPageStart", [name], success ,error);
};

UmengAnalyticsPlugin.prototype.onPageEnd = function (name , success ,error) {
    this.call_native("onPageEnd", [name], success , error);
};

UmengAnalyticsPlugin.prototype.onEvent = function (data , success ,error) {
    this.call_native("onEvent", [data], success , error);
};

UmengAnalyticsPlugin.prototype.onEventValue = function (data , success ,error) {
    this.call_native("onEventValue", [data], success , error);
};

if (!window.plugins) {
    window.plugins = {};
}

if (!window.plugins.umengAnalyticsPlugin) {
    window.plugins.umengAnalyticsPlugin = new UmengAnalyticsPlugin();
}

module.exports = new UmengAnalyticsPlugin();